{% extends "admin/change_form.html" %}
{% load admin_urls i18n %}

{% block extrahead %}{{ block.super }}
    {{ form.media }}
{% endblock %}

{% block breadcrumbs %}{% if not is_popup %}
    <div class="px-4 lg:px-8">
        <div class="container mb-6 mx-auto -my-3 lg:mb-12">
            <ul class="flex flex-wrap">
                {% url 'admin:index' as link %}
                {% trans 'Home' as name %}
                {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=name %}

                {% url 'admin:app_list' app_label=opts.app_label as link %}
                {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=opts.app_config.verbose_name %}

                {% url opts|admin_urlname:'changelist' as link %}
                {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=opts.verbose_name_plural|capfirst %}

                {% url opts|admin_urlname:'change' object.pk|admin_urlquote as link %}
                {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=original|truncatewords:'18' %}

                {% trans 'Object permissions' as name %}
                {% include 'unfold/helpers/breadcrumb_item.html' with link="../../" name=name %}

                {% include 'unfold/helpers/breadcrumb_item.html' with link='' name=group_obj|truncatewords:"18" %}
            </ul>
        </div>
    </div>
{% endif %}{% endblock %}

{% block content %}
    <div class="border border-gray-200 overflow-hidden rounded-md p-3 shadow-sm dark:border-gray-800">
        <form method="post">
            {% csrf_token %}

            {% trans "Object" as title %}
            {% include "unfold/helpers/field_readonly.html" with title=title value=object %}

            {% trans "Group" as title %}
            {% include "unfold/helpers/field_readonly.html" with title=title value=group_obj %}

            {% include "unfold/helpers/field.html" with field=form.permissions %}

            <div class="bg-gray-50 border-t flex flex-row -m-3 p-3 dark:bg-white/[.02] dark:border-gray-800">
                <div class="ml-auto">
                    {% trans "Save" as title %}
                    {% include "unfold/helpers/submit.html" with title=title %}
                </div>
            </div>
        </form>
    </div>
{% endblock %}
